package com.shop.service;

import com.github.pagehelper.PageInfo;
import com.shop.entity.Category;

public interface CategoryService {
    /**
     * 获取所有分类
     * @param pageNum
     * @param pageSize
     * @return
     */
    PageInfo<Category> listCategory(Integer pageNum, Integer pageSize);


    Category getCategory(String name);
    Category getCategoryById(Integer id);
    /**
     *  添加分类
     * @param category
     */
    void addCategory(Category category);

    /**
     * 删除分类
     * @param id
     */
    void deleteCategory(Integer id);
    void updateCategory(Category category);
    int getTotal();
}
